<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>animation</title>
    <style>
        .rect {
            position: aboslute;
            top: 0;
            left: 0;
            width: 200px;
            height: 200px;
            margin: 0 auto;
            font-size: 125pt;
            line-height: 200px;
            text-align: center;
            background-color: #bbb;
            opacity: .5;
            animation: rotate 8s infinite linear;
        }
        @keyframes rotate {
            from {
                transform: rotateY(0);
            }
            to {
                transform: rotateY(360deg);
            }
        }
    </style>
</head>
<body>
    <div class="rect">6</div>
</body>
</html>